<template>
  <div style="display: inline-block">
    <el-link
      :underline="false"
      :type="type"
      :disabled="disabled"
      @click="handleClick"
    >
    <span v-if="$slots.default" class="el-link--inner">
      <slot></slot>
    </span>

    </el-link>
    <span class="el-link-line">|</span>
  </div>



</template>

<script>
export default {
  name: "DiyLink",
  props: {
    type: {
      type: String,
      default: 'default'
    },
    underline: {
      type: Boolean,
      default: true
    },
    disabled: Boolean,
    href: String,
    icon: String
  },
  methods: {
    handleClick(event) {
      if (!this.disabled) {
        if (!this.href) {
          this.$emit('click', event);
        }
      }
    }
  }
}
</script>

<style scoped>

</style>
